import type {Ref} from 'vue';
import type {
	BeforeProcessor,
} from '../../type';

export type UseStateToggleStatus<S>=boolean|S;
export type UseStateToggleBeforeChange<S>=
	UseStateToggleStatus<S>|
	{
		key:any;
		active:UseStateToggleStatus<S>;
	};
export interface UseStateToggleParam<S>{
	key:() => any;
	value:() => any;
	active:() => S;
	disabled:() => boolean;
	aloneActive:(val:any) => S;
	beforeChange:BeforeProcessor<any>;
	aloneValue:(active:UseStateToggleStatus<S>) => any;
	emit:{
		(e:'update:modelValue',val:any):void;
		(e:'active',val:any):void;
		(e:'inactive',val:any):void;
	};
	rootRef?:Ref<HTMLElement>;
}